import storage from 'store'
// import { loadLanguageAsync } from '@/locales'

const purchase = {
  state: {
    purchaseDetail: {}
  },

  mutations: {
    purchaseDetail: (state, info) => {
      state.purchaseDetail = info
      storage.set('purchaseDetail', info)
    }
  },
  actions: {
    // setLang ({ commit }, lang) {
    //   return new Promise((resolve, reject) => {
    //     commit(APP_LANGUAGE, lang)
    //     loadLanguageAsync(lang).then(() => {
    //       resolve()
    //     }).catch((e) => {
    //       reject(e)
    //     })
    //   })
    // }
  }
}

export default purchase
